/*** * @Author: lwt * @description: 这里是描述 */
<template>
  <div>
    <a-date-picker v-model:value="value1" />
    <a-date-picker v-model:value="value2" picker="week" />
    <van-button type="danger">危险按钮</van-button>
    <button @click="vantToast">提示框</button>
    <button @click="gorequest">发送请求</button>
    <button @click="testVuex">测试vuex</button>
    {{ $store.getters["moduleA/getInfo"] }}
    <div>bootstarp</div>
    <!-- <div class="container">
    <div class="btn-group" role="group" aria-label="Basic example">
      <button type="button" class="btn btn-secondary">Left</button>
      <button type="button" class="btn btn-secondary">Middle</button>
      <button type="button" class="btn btn-secondary">Right</button>
    </div>
  </div> -->
    <div class="container">
      <div class="row">
        <div class="col-sm-6 col-lg-4">
          <div class="card">
            <div class="card-body">
              <h5 class="card-title">Card title</h5>
              <p class="card-text">
                Some quick example text to build on the card title and make up
                the bulk of the card's content.
              </p>
              <a href="#" class="btn btn-primary">Go somewhere</a>
            </div>
          </div>
        </div>
        <div class="col-sm-6 col-lg-4">
          <div class="card">
            <div class="card-body">
              <h5 class="card-title">Card title</h5>
              <p class="card-text">
                Some quick example text to build on the card title and make up
                the bulk of the card's content.
              </p>
              <a href="#" class="btn btn-primary">Go somewhere</a>
            </div>
          </div>
        </div>
        <div class="col-sm-6 col-lg-4">
          <div class="card">
            <div class="card-body">
              <h5 class="card-title">Card title</h5>
              <p class="card-text">
                Some quick example text to build on the card title and make up
                the bulk of the card's content.
              </p>
              <a href="#" class="btn btn-primary">Go somewhere</a>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script setup>
import { ref } from "vue";
import { showToast } from "vant";
import API from "../network/api/index.js";
import { message } from "ant-design-vue";
import { useStore } from "vuex";
const store = useStore();
//用ref定义基础型数据，修改数据时要加.value,reactive定义对象或数组，不需要加.value
const value1 = ref();
const value2 = ref();
const vantToast = () => {
  showToast("提示内容");
};
const gorequest = () => {
  API.post("testList", {})
    .then((res) => {
      console.log(res);
    })
    .catch((err) => {
      message.error(err.message);
    });
};
const testVuex = () => {
  store.commit("moduleA/changeInfo", "info改变");
};
</script>
